#include <cstdio>

int p[40];

int main() {
	int n;
	scanf("%d", &n);
	p[1] = 1;
	printf("1\n");
	for (int i=2; i<=n; i++) {
		p[i] = 1;
		for (int j=i-1; j>=2; j--) {
			p[j] = p[j]+p[j-1];
		}
		p[1] = 1;
		bool first = true;
		for (int j=1; j<=i; j++) {
			if (first) first=false;
			else printf(" ");
			printf("%d", p[j]);
		}
		printf("\n");
	}
	return 0;
}
